<!--header-->
{include file="public/_meta" title="推送列表"/}
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 推送管理 <span
        class="c-gray en">&gt;</span> 推送列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
                                              href="javascript:location.replace(location.href);" title="刷新"><i
        class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div class="text-c">
        <form action="{:url('jpush/index')}" method="get">
	 <span class="select-box inline">
		<select name="catid" class="select">
          <option value="0">全部分类</option>
            {volist name='cats' id='vo'}
                <option value="{$key}" {if condition="$key eq $catid" }selected="selected" {/if}>{$vo}</option>
            {/volist}
        </select>
		</span> 日期范围：
            <input type="text" name="start_time" class="input-text" id="countTimestart" onfocus="selecttime(1)"
                   value="{$start_time}" style="width:120px;">
            -
            <input type="text" name="end_time" class="input-text" id="countTimestarts" onfocus="selecttime(1)"
                   value="{$end_time}" style="width:120px;">

            <input type="text" name="title" id="" value="{$title}" placeholder=" 推送名称" style="width:250px"
                   class="input-text">
            <button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜推送
            </button>
        </form>
    </div>

    <div class="mt-20">
        <table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
            <thead>
            <tr class="text-c">
                <th width="20">ID</th>
                <th width="220">标题</th>
                <th width="60">分类</th>
                <th width="80">文章</th>
                <th width="120">更新时间</th>
                <th width="60">发布状态</th>
                <th width="120">操作</th>
            </tr>
            </thead>
            <tbody>
            {volist name="news" id="vo"}
            <tr class="text-c">
                <td>{$vo.id}</td>
                <td class="text-l"><u style="cursor:pointer" class="text-primary"
                                      title="查看">{$vo.title|mb_substr=0,30}</u></td>
                <td>{$vo.catid|getCatName}</td>
                <td>{$vo.news_id}</td>
                <td>{$vo.update_time}</td>
                <td class="td-status">{$vo.status|status=$vo.id,###}</td>
                <td class="f-14 td-manage"><a style="text-decoration:none" class="ml-5"
                                              href="{:url('jpush/edit', ['id'=>$vo.id])}" title="编辑"><i
                        class="Hui-iconfont">&#xe6df;</i></a> <a
                        style="text-decoration:none" class="ml-5" onClick="app_del(this)" href="javascript:;" title="删除"
                        del_url="{:url('jpush/delete', ['id'=>$vo.id])}"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
            </tr>
            {/volist}
            </tbody>
        </table>
        <div id="laypage"></div>
    </div>


</div>
<!--header-->
{include file="public/_footer" /}

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__STATIC__/hadmin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="__STATIC__/hadmin/lib/laypage/1.2/laypage.js"></script>

<script type="text/javascript">
  var url = '{:url("jpush/index")}' + '?{$query}';
  //alert(url);
  laypage({
    cont: 'laypage', //容器。值支持id名、原生dom对象，jquery对象,
    pages: '{$pageTotal}', //总页数
    skin: '#5FB878', //皮肤
    curr: '{$curr}',
    jump: function (e, first) { //触发分页后的回调
      if (!first) { //一定要加此判断，否则初始时会无限刷新
        //alert(url+'?page='+e.curr);
        location.href = url + '&page=' + e.curr;
      }
    }
  });

</script>

</body>
</html>